<include file="public:header" />
<!--打卡-->
<div class="pad_lr_10">

  <form name="searchform" method="get" >
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
                    <input type="hidden" name="g" value="admin" />
                    <input type="hidden" name="m" value="attendance" />
                    <input type="hidden" name="a" value="index" />
                    <input type="hidden" name="menuid" value="{$menuid}" />
                    &nbsp;&nbsp;{:L('please_select')}{:L('store')}：
                    <select class="J_cate_select mr10" data-pid="0" data-uri="{:U('region/ajax_getchilds',array('type'=>'store'))}" data-selected="{$search.selected_ids}"></select>
                    <input type="hidden" name="regionId" id="J_cate_id" value="{$search.cate_id}" /> 
                                  
                                        
                     &nbsp;&nbsp;申请时间 ：
                    <input type="text" name="time_start" id="time_start" class="date" size="12" value="{$search.time_start}">
                    -
                    <input type="text" name="time_end" id="time_end" class="date" size="12" value="{$search.time_end}">
                    
                    &nbsp;&nbsp; 审核结果类型 :
                    <select name="verifyType">
                        <option value="">-{:L('all')}-</option>
                        <option value="0">未审核</option>
                        <volist name="leaveType" id="item">
                            <option <if condition="$key eq $search['verifyType']"> selected="" </if> value="{$key}">{$item}</option>
                        </volist>
                    </select>                      
 				    &nbsp;&nbsp;用户名：
                    <input type="text" name="userName" class="input-text" size="12" value="{$search.userName}" />                            
                                      
				    &nbsp;&nbsp;
                    <input type="submit" name="search" class="btn" value="搜索" />
					
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>


    <div class="J_tablelist table_list" data-acturi="{:U('attendance/ajax_edit')}">
        <table width="100%" cellspacing="0">
            <thead>
            <tr>
                <th width="40"><input type="checkbox" name="checkall" class="J_checkall"></th>
                <th width="40">ID</th>
                <th width="50">姓名</th>  
                <th>营业厅</th>  
                <th>考勤日期</th>    
                <th>上班时间</th> 
                <th>上班图片</th>   
                <th>下班时间</th>  
                <th>下班图片</th>    
                <th>考勤审核结果</th>  
                <th>审核的备注信息</th>    
                <th>当天请假情况</th>  
                <th>操作</th>      
            </tr>
            </thead>
    	    <tbody>
            <volist name="list" id="val" >
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center" width="20">{$val.id}</td>
                <td align="center" >{$val['realName']}</td>
                <td align="center" >{$val['storeName']}</td>                       
                <td align="center">{$val.workDate}</td>                
                <td align="center">
                <if condition="$val['inWorkTime']">
                    {$val.inWorkTime|date='Y-m-d H:i:s',###}
                    <else />
                    未打卡
                </if>
                </td>
                <td align="center">
					<a href="javascript:;" class="J_showdialog" data-uri="/index.php?m=attendance&a=photo&path={:C('pin_attach_path').$val['inWorkImage']}" data-title="打卡图片详情" data-id="photo" data-width="450" data-height="450">
						<img width="50px" src="{:C('pin_attach_path').$val['inWorkImage']}" />
					</a>
				</td>
                <td align="center">
                <if condition="$val['offWorkTime']">
                    {$val.offWorkTime|date='Y-m-d H:i:s',###}
                    <else />
                    未打卡
                </if>    
                </td>            
                <td align="center">
					<a href="javascript:;" class="J_showdialog" data-uri="/index.php?m=attendance&a=photo&path={:C('pin_attach_path').$val['offWorkImage']}" data-title="打卡图片详情" data-id="photo" data-width="450" data-height="450">
						<img width="50px" src="{:C('pin_attach_path').$val['offWorkImage']}" />
					</a>
				</td>   
                <td align="center">{$checkVerifyType[$val['verifyType']]}</td>             
                <td align="center">{$val.verifyRemark}</td>
                <td align="center">{$val.leaveDays}</td>
                <td>
                <a href="{:U('attendance/checkVerify', array('checkId'=>$val['id']))}" >审核</a>                   
                </td>
            </tr>
            </volist>
    	   </tbody>
        </table>
    </div>
    <div class="btn_wrap_fixed">
		<label class="select_all mr10"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
    	<input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('attendance/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
		<div id="pages">{$page}</div>
    </div>
</div>
<include file="public:footer" />
<link rel="stylesheet" type="text/css" href="__STATIC__/js/calendar/calendar-blue.css"/>
<script src="__STATIC__/js/calendar/calendar.js"></script>
<script>
Calendar.setup({
    inputField : "time_start",
    ifFormat   : "%Y-%m-%d",
    showsTime  : false,
    timeFormat : "24"
});
Calendar.setup({
    inputField : "time_end",
    ifFormat   : "%Y-%m-%d",
    showsTime  : false,
    timeFormat : "24"
});
</script>
<script>
$('.J_cate_select').cate_select({top_option:lang.all});
</script>
</body>
</html>